﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:map="clr-namespace:Microsoft.Maps.MapControl;assembly=Microsoft.Maps.MapControl"
            xmlns:DeepEarth_BingMapsToolkit_Client_Controls="clr-namespace:DeepEarth.BingMapsToolkit.Client.Controls;assembly=DeepEarth.BingMapsToolkit.Client.Controls.Find" 
            x:Class="SMIL.Client.CoordinateXAP.MainPage"
            xmlns:p="clr-namespace:DeepEarth.BingMapsToolkit.Client.Controls;assembly=DeepEarth.BingMapsToolkit.Client.Controls.PersistedState"
            Background="Black"
             >

    <UserControl.Resources>

        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/DeepEarth.BingMapsToolkit.Client.Common;component/Resources/CommonStyles.xaml" />
            </ResourceDictionary.MergedDictionaries>
            </ResourceDictionary>

    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
    	<VisualStateManager.VisualStateGroups>
    		<VisualStateGroup x:Name="MyMouseStates">
    			<VisualStateGroup.Transitions>
    			</VisualStateGroup.Transitions>
    			<VisualState x:Name="MyMouseEnter">
    				<Storyboard>
    					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="sPanel" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
    						<EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="56"/>
    					</DoubleAnimationUsingKeyFrames>
    					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="sPanel" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
    						<EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
    					</DoubleAnimationUsingKeyFrames>
    				</Storyboard>
    			</VisualState>
    			<VisualState x:Name="My2ndMouseState">
    				<Storyboard>
    					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="sPanel" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
    						<EasingDoubleKeyFrame KeyTime="00:00:00" Value="56"/>
    						<EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
    					</DoubleAnimationUsingKeyFrames>
    				</Storyboard>
    			</VisualState>
            </VisualStateGroup>
    	</VisualStateManager.VisualStateGroups>
        <map:Map x:Name="map" 
                 NavigationVisibility="Collapsed" 
                 ScaleVisibility="Collapsed"
                 />
        <Border x:Name="sPanel" 
			Height="64" 
			CornerRadius="8" 
			VerticalAlignment="Top" 
			Opacity="0.84" 
			Background="#FF7C7C7C" Margin="0,-56,0,0" RenderTransformOrigin="0.5,0.5">
        	<Border.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform/>
        			<SkewTransform/>
        			<RotateTransform/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</Border.RenderTransform>
		<StackPanel Orientation="Horizontal">
        		<ToggleButton x:Name="tbMark" 
        			Checked="tbMark_Checked"
        			Unchecked="tbMark_Unchecked"
        			VerticalAlignment="Top" 
        			HorizontalAlignment="Left" 
        			Margin="8,8,4,8" 
        			Style="{StaticResource ToggleButtonStyle}"
        			ToolTipService.ToolTip="Mark in the map"
                          >
        			<Image Source="Images/PinIconForMeny.png" Stretch="None" Height="44" Width="24" />
        		</ToggleButton>

        		<Button x:Name="bFullscren" Click="bFullScreen_Click" Margin="4,8" Style="{StaticResource ButtonStyle}" ToolTipService.ToolTip="Full screen">
        			<Image Source="Images/FullScreen.png"  />
        		</Button>

        		<DeepEarth_BingMapsToolkit_Client_Controls:FindControl 
					x:Name="findControl" 
					Height="16" 
					Width="104" 
					HorizontalAlignment="Left" 
					MapName="map" 
					VerticalAlignment="Top"  BorderThickness="0"
        			ToolTipService.ToolTip="Find" Margin="4,8" />
					
        		<p:PersistedState MapName="map" x:Name="persisted" HorizontalAlignment="Right" Margin="0,0,-104,0" />
        	
			</StackPanel>
        </Border>
    </Grid>
</UserControl>
